package asteroids.model.programs.statements;

import java.util.List;

public class StatementList extends Statement {

	public StatementList(int line, int column, List<Statement> statements) {
		super(line, column);
		this.statements = statements;
	}
	
	public StatementList(StatementList other) {
		this(other.getLine(), other.getColumn(), other.getStatements());
	}
	
	public List<Statement> getStatements() {
		return statements;
	}
	
	public void setFirstStatement(Statement s) {
		statements.set(0,s);
	}

	private List<Statement> statements;

	@Override
	public void accept(StatementRunner sr) {
		sr.run(this);
	}
}
